<?php
require_once 'loader.php';
require_once 'Mobitv/Cronjobs/Reporting.php';
$reporting = new Mobitv_Cronjobs_Reporting();

$today = date('Y-m-d');
$yesterday = date('Y-m-d', strtotime($today) - 60*60*24);

for($d=strtotime($yesterday); $d<=strtotime($today); $d+=60*60*24)
{
    $date = date('Y-m-d', $d);
    $reporting->setDate($date);
    $reporting->updateDailyVideo();

    echo "UPDATE VIDEO REPORTING ON " . $date . "\n";
}
